package mirrormonkey.rpc.messages;

import com.jme3.network.Message;
import com.jme3.network.serializing.Serializable;

@Serializable
public class RpcCallMessage implements Message {

	public int entityId;

	public int methodId;

	public int callId;

	public Object[] parameters;

	public boolean reliable;

	public long estdInvocationTime;

	public RpcCallMessage() {
	}

	public RpcCallMessage(int entityId, int methodId, int callId,
			Object[] parameters, boolean reliable, long estdInvocationTime) {
		this.entityId = entityId;
		this.methodId = methodId;
		this.callId = callId;
		this.parameters = parameters;
		this.reliable = reliable;
		this.estdInvocationTime = estdInvocationTime;
	}

	@Override
	public boolean isReliable() {
		return reliable;
	}

	@Override
	public Message setReliable(boolean reliable) {
		this.reliable = reliable;
		return this;
	}

}
